require("../../../common/manifest.js"), require("../../../common/vendor.js"), global.webpackJsonpMpvue([ 4 ], {
    Jgtk: function(t, e, a) {
        var i = {
            render: function() {
                var t = this, e = t.$createElement, a = t._self._c || e;
                return a("div", {
                    staticClass: "main-bg"
                }, [ a("div", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.isConnected,
                        expression: "isConnected"
                    } ]
                }, [ a("img", {
                    directives: [ {
                        name: "show",
                        rawName: "v-show",
                        value: t.enterNum < 3 && t.isGuide,
                        expression: "enterNum < 3 && isGuide"
                    } ],
                    staticClass: "guide-icon",
                    attrs: {
                        src: "/static/images/guide.png"
                    }
                }), t._v(" "), a("img", {
                    staticClass: "cloud",
                    attrs: {
                        src: "/static/images/cloud.png"
                    }
                }), t._v(" "), a("div", {
                    staticClass: "input-box",
                    attrs: {
                        eventid: "0"
                    },
                    on: {
                        click: t.goSearch
                    }
                }, [ a("img", {
                    staticClass: "search-icon",
                    attrs: {
                        src: "/static/images/search.png"
                    }
                }), t._v(" "), a("p", {
                    staticClass: "main-input"
                }, [ t._v("请输入搜索内容") ]) ], 1), t._v(" "), a("div", {
                    staticClass: "enter"
                }, [ a("img", {
                    staticClass: "enter-pic bg-enter",
                    attrs: {
                        src: "/static/images/bg-enter.png",
                        eventid: "1"
                    },
                    on: {
                        click: t.goBg
                    }
                }), t._v(" "), a("img", {
                    staticClass: "enter-pic match-enter",
                    attrs: {
                        src: "/static/images/match-enter.png",
                        eventid: "2"
                    },
                    on: {
                        click: t.goMatch
                    }
                }) ]), t._v(" "), a("div", {
                    staticClass: "recommend-container"
                }, [ t._m(0), t._v(" "), a("div", {
                    staticClass: "recommend-box"
                }, t._l(t.recommendArr, function(e, i) {
                    return a("div", {
                        staticClass: "recommend-wrapper"
                    }, [ a("div", {
                        staticClass: "recommend",
                        style: {
                            "background-image": "url(" + e.preview + ")"
                        },
                        attrs: {
                            eventid: "3_" + i
                        },
                        on: {
                            click: function(e) {
                                t.goDetails(i);
                            }
                        }
                    }) ]);
                })) ]), t._v(" "), a("div", {
                    staticClass: "tab-container",
                    class: {
                        "tab-container-active": t.isFit
                    }
                }, [ a("div", {
                    staticClass: "tab-box"
                }, [ a("img", {
                    staticClass: "icon",
                    attrs: {
                        src: "/static/images/main-on.png"
                    }
                }), t._v(" "), a("p", {
                    staticClass: "word"
                }, [ t._v("首页") ]) ], 1), t._v(" "), a("div", {
                    staticClass: "tab-box",
                    attrs: {
                        eventid: "4"
                    },
                    on: {
                        click: t.goSort
                    }
                }, [ a("img", {
                    staticClass: "icon",
                    attrs: {
                        src: "/static/images/sort.png"
                    }
                }), t._v(" "), a("p", [ t._v("分类") ]) ], 1) ]) ]), t._v(" "), t.isConnected ? t._e() : a("div", {
                    staticClass: "network-remind"
                }, [ a("img", {
                    staticClass: "remind-icon",
                    attrs: {
                        src: "/static/images/network-remind.png"
                    }
                }), t._v(" "), a("p", [ t._v("网络开小差了~ ") ]) ], 1) ]);
            },
            staticRenderFns: [ function() {
                var t = this.$createElement, e = this._self._c || t;
                return e("div", {
                    staticClass: "title-box"
                }, [ e("div", {
                    staticClass: "title-icon"
                }), this._v(" "), e("img", {
                    staticClass: "title-name",
                    attrs: {
                        src: "/static/images/recommend.png"
                    }
                }) ]);
            } ]
        };
        e.a = i;
    },
    Qjhx: function(t, e, a) {
        Object.defineProperty(e, "__esModule", {
            value: !0
        });
        var i = a("5nAL"), n = a.n(i), s = a("t0K4");
        n.a.config.errorHandler = function(t) {
            console && console.error && console.error(t);
        }, new n.a(s.a).$mount();
    },
    hzVe: function(t, e) {},
    rgah: function(t, e, a) {
        (function(t) {
            e.a = {
                data: function() {
                    return {
                        recommendArr: [],
                        placeholder: "请输入搜索内容",
                        isConnected: !0,
                        enterNum: 0,
                        isGuide: !0,
                        timer: "",
                        isFit: !1
                    };
                },
                onLoad: function(t) {
                    var e = null;
                    wx.createInterstitialAd && ((e = wx.createInterstitialAd({
                        adUnitId: "adunit-13934bc1d3a77a93"
                    })).onLoad(function() {}), e.onError(function(t) {}), e.onClose(function() {})), 
                    e && e.show().catch(function(t) {
                        console.error(t);
                    }), this.getData(), this.setGuide();
                },
                onShow: function() {
                    0 === this.globalData.scene && (this.globalData.isScene = !0), this.globalData.isScene && (this.globalData.isScene = !1, 
                    this.getData()), this.globalData.scene = 1, this.setName(), this.enterNum < 3 && (clearTimeout(this.timer), 
                    this.isGuide = !0), this.setGuide();
                },
                onHide: function() {
                    this.globalData.scene = 0;
                },
                onShareTimeline(){
                    return {title:'想要的精美手机壁纸，在这里全可以搜到哦~~'}
                },
                onShareAppMessage: function() {
                    var t = this.globalData.shareArr;
                    return {
                        title: t[Math.floor(Math.random() * t.length)],
                        path: "/pages/main/index/main"
                    };
                },
                mounted: function() {
                    var e = this;
                    t.mpvue.onNetworkStatusChange(function(t) {
                        e.isConnected = t.isConnected;
                    });
                },
                methods: {
                    getData: function() {
                        var e = this;
                        t.mpvue.request({
                            url: "https://news.moxiu.com/applets/wallpaper/recommend",
                            method: "GET",
                            dataType: "json",
                            header: {
                                "content-type": "application/json"
                            },
                            success: function(t) {
                                e.recommendArr = t.data.data.list;
                            },
                            fail: function(e) {
                                t.mpvue.showToast({
                                    title: "网络异常，请稍后再试",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    setName: function() {
                        var e = this;
                        t.mpvue.setNavigationBarTitle({
                            title: "魔秀精选壁纸"
                        }), this.isFit || t.mpvue.getSystemInfo({
                            success: function(t) {
                                Boolean(t.model.match(/iphone X/gi)) && (e.isFit = !0);
                            }
                        });
                    },
                    setGuide: function() {
                        var e = this;
                        t.mpvue.getStorage({
                            key: "enterNum",
                            success: function(t) {
                                e.enterNum = t.data + 1, e.enterNum < 3 && (e.timer = setTimeout(function() {
                                    e.isGuide = !1;
                                }, 5e3));
                            }
                        }), t.mpvue.setStorage({
                            key: "enterNum",
                            data: this.enterNum
                        });
                    },
                    goContent: function(e, a) {
                        var i = "/pages/main/result/main?tag=avatar&id=" + e + "&name=" + a;
                        t.mpvue.navigateTo({
                            url: i
                        });
                    },
                    goSearch: function() {
                        t.mpvue.navigateTo({
                            url: "/pages/main/search/main"
                        });
                    },
                    goMatch: function() {
                        t.mpvue.navigateToMiniProgram({
                            appId: "wx3aa2e7600b6e902b"
                        });
                    },
                    goSort: function() {
                        t.mpvue.reLaunch({
                            url: "/pages/main/sort/main"
                        });
                    },
                    goBg: function() {
                        t.mpvue.navigateTo({
                            url: "/pages/bg/result/main"
                        });
                    },
                    goDetails: function(e) {
                        var a = "/pages/main/details/main?tag=main&index=" + e;
                        t.mpvue.setStorage({
                            key: "wallpaperArr",
                            data: this.recommendArr,
                            success: function(e) {
                                t.mpvue.navigateTo({
                                    url: a
                                });
                            }
                        });
                    }
                }
            };
        }).call(e, a("DuR2"));
    },
    t0K4: function(t, e, a) {
        var i = a("rgah"), n = a("Jgtk"), s = a("ybqe")(i.a, n.a, function(t) {
            a("hzVe");
        }, null, null);
        e.a = s.exports;
    }
}, [ "Qjhx" ]);